<?php
namespace app\common\system\validate;

use app\common\system\logic\FormLogic;
use think\Validate;

class AuthRoleValidate extends Validate
{
    protected $rule = [
        'id' => 'require|gt:0',
        'title' => 'require|unique:system_auth_role,title'
    ];

    protected $message = [
        'id.require' => '参数错误',
        'id.gt' => '请选择要编辑的角色',
        'title.require' => '角色名称不能为空',
        'title.unique' => '角色名称已经存在'
    ];

    protected $scene = [
        'create' => ['title'],
        'edit' => ['id','title'],
    ];

}